package com.asia5b.a5mall.middleware.api

import com.asia5b.a5mall.middleware.model.goods.HotModel
import com.asia5b.a5mall.middleware.model.goods.KeywordModel
import com.asia5b.a5mall.middleware.model.home.HomeBannerMoel
import com.asia5b.a5mall.middleware.model.home.HomeFloorAllModel
import com.asia5b.a5mall.middleware.model.home.HomeMenuModel
import io.reactivex.Observable
import retrofit2.http.GET
import retrofit2.http.Path
import retrofit2.http.Query

/**
 * Created by zhangyuncai on 2019/12/21.
 * @Note   额外API
 */
interface ExtraApi {

    /**
     * @Note   获取关键字
     * @param  num 获取数量
     */
    @GET("pages/hot-keywords")
    fun getKeyword(@Query("num") num: Int): Observable<ArrayList<HotModel>>

    @GET("goods/search/words")
    fun getSearchKeyword(@Query("keyword") keyword: String): Observable<ArrayList<KeywordModel>>

    /**
     * banner
     */
    @GET("focus-pictures")
    fun getBanner(@Query("client_type") type: String = "WAP"): Observable<ArrayList<HomeBannerMoel>>

    /**
     * 菜单
     */
    @GET("pages/site-navigations")
    fun getMenu(@Query("client_type") type: String = "MOBILE"): Observable<ArrayList<HomeMenuModel>>

    /**
     * @Note   获取楼层数据
     * @param  clientType
     */
    @GET("pages/{client_type}/{page_type}")
    fun getFloor(@Path("client_type") client_type: String = "WAP",
                 @Path("page_type") page_type: String = "INDEX"): Observable<HomeFloorAllModel>
}